<h1>Prodavnice</h1>
<p>
    <strong><?= $this->Html->link("+ Nova prodavnica", "/prodavnice/nova") ?></strong>
    | <?= $this->Html->link('Klijenti', '/klijenti') ?>
</p>

<?= $this->Form->create('Filter', array('url'=>'/prodavnice' , 'class'=>'filter-form', 'type'=>'get')) ?>

	<?= $this->Form->label('keyword', 'Ključna reč:')?>
	<?= $this->Form->text('keyword', array('value'=>@$filter['keyword']))?>

	<?= $this->Form->label('client', 'Klijent:')?>
	<?= $this->Form->select('client', $clients, array('value'=>@$filter['client'], 'empty'=>'--SVI--'))?>

	<?= $this->Form->label('status', 'Status:')?>
	<?= $this->Form->select('status', array('neaktivne', 'aktivne'), array('value'=>@$filter['status'], 'empty'=>'--SVE--'))?>

	<?= $this->Form->submit('Traži', array('div'=>false))?>
	<?= $this->Html->link('Poništi', '/proizvodi', array('class'=>'reset')) ?>
	
<?= $this->Form->end() ?>

<?= $this->element('entity_table', array(
	"columns" => array(
		"Naziv" => "Store.name",
		"MPO" => "Store.code",
		"Adresa" => array("Store.address", "Store.tonwship", "Store.city"),
		"Telefon" => "Store.phone",
		"Klijent" => "Client.name",
		"Poslovođa" => array("Poslovodja.name", "Poslovodja.phone")
	),
	"separator" => "<br>",
	"rows" => $data,
	"row_id" => "Store.id",
	"delete_confirm" => "Da li želite da obrišete prodavnicu: {Store.name}?"
)); ?>
<?= $this->element('pagination') ?>
